gdk/toplevellayout: Change API to be about intent, not full state
authorJonas Ådahl <jadahl@gmail.com>
Wed, 16 Dec 2020 10:53:19 +0000 (11:53 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Wed, 16 Dec 2020 13:16:08 +0000 (14:16 +0100)
commit142f7862ed0aaa72177286f614430f8a555ad1cb
tree58d1f0c89b02e75e829ddfaeec0a81bc5518fc1b
parentb6412adc3288377c795abdb96622a5fac2ec382f
gdk/toplevellayout: Change API to be about intent, not full state

When being fullscreen, and wanting to unfullscreen but not caring about
whether to go unmaximized or maximized (as this information is lost), if
the GdkToplevelLayout represents the full intended state, we won't be
able to do the right thing.

To avoid this issue, make the GdkToplevelLayout API intend based, where
if one e.g. doesn't call gdk_toplevel_set_maximized() with anything, the
backend will not attempt to change the maximized state.

This means we can also remove the old 'initially_maximized' and
'initially_fullscreen' fields from the private GtkWindow struct, as we
only deal with intents now.
gdk/broadway/gdksurface-broadway.c
gdk/gdktoplevellayout.c
gdk/gdktoplevellayout.h
gdk/macos/gdkmacostoplevelsurface.c
gdk/wayland/gdksurface-wayland.c
gdk/win32/gdksurface-win32.c
gdk/x11/gdksurface-x11.c
gtk/gtkwindow.c